package com.wyx.job;

import com.wyx.service.impl.SmokeServiceImpl;
import com.xxl.job.core.context.XxlJobHelper;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @author 吴宇~
 * @motto 我亦无他，唯手熟尔。
 * @edition jdk1.8
 * @reflection 0-1 喧闹任其喧闹，自由我自为之，我自风情万种，与世无争。
 * @date 2024/04/05/16:55
 * @target 心若有所向往，何惧道阻且长
 */
//@Component
public class SmokeTask {
    @Autowired
    private SmokeServiceImpl smokeService;
    /**
     * 定时更新数据库并做消息推送
     */
    @XxlJob("updateSmokeAndPushMessageToUser")
    public void demoJobHandler() throws Exception {
//        XxlJobHelper.log("XXL-JOB, updateSmokeAndPushMessageToUser. start");
        System.out.println("XXL-JOB, updateSmokeAndPushMessageToUser. start");
//        boolean b = smokeService.updateDatabase();
//        System.out.println("XXL-JOB,updateSmokeAndPushMessageToUser . " +b);
    }
}
